package d0326;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class TestHashSet {
    public static void main(String[] args) {
        Set<String> set=new HashSet();
        set.add("a111");
        set.add("b222");
        set.add("c333");
        set.add("a111");
        System.out.println("个数是:"+set.size());
        System.out.println("contains:"+set.contains("b222"));
        System.out.println("remove:"+set.remove("b222"));
        System.out.println("isEmpty:"+set.isEmpty());

        //set.clear();

        for (String str:
             set) {
            System.out.println(str);
        }

    }
}
